package com.jakx.dao;

import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CurlLogMapper {

    @Results(id = "curlLogMapper", value = {
            @Result(column = "id", property = "id"),
            @Result(column = "url", property = "url"),
            @Result(column = "pid", property = "pid"),
            @Result(column = "nid", property = "nid"),
            @Result(column = "txt", property = "txt"),
            @Result(column = "use_time", property = "useTime")
    })

    @Select("select * from curl_log")
    List<CurlLogPojo> getAll();

    @Insert("insert into `curl_log`(url, pid, nid, txt,use_time) values (#{url}, #{pid}, #{nid}, #{txt}, #{useTime})")
    void savePojo(CurlLogPojo pojo);
}
